<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 17-2-19
 * Time: 下午3:48
 */
//phpinfo();

/* 一个unix样式的命令行过滤器，用于将段落开始部分的大写字母转换为小写。 */
$fp = fopen( "php://stdin", "r" ) or die( "can't read stdin" );
while ( ! feof( $fp ) ) {
	$line = fgets( $fp );
	exec($line,$result);
	$str = '';
	foreach ($result as $key => $val){
		$str .= $key .'-'.$val.PHP_EOL;
	}
	echo $str;
//	echo $line;
}
fclose( $fp );



